<template>
  <div>

    <div class="btn">
      <i class="el-icon-arrow-left" @click="fh"></i>
    </div>

<div class="btn2">
  <van-form @submit="onSubmit">
    <van-cell-group inset>
      <van-field
        v-model="onSubmit.username"
        name="用户名"
        label="用户名"
        placeholder="用户名"
        :rules="[{ required: true, message: '请填写用户名' }]"
      />
      <van-field
        v-model="onSubmit.usercard"
        type="password"
        name="证件号码"
        label="证件号码"
        placeholder="证件号码"
        :rules="[{ required: true, message: '请填写证件号码' }]"
      />
    </van-cell-group>
  </van-form>
</div>

      <div style="margin: 16px;">
        <van-button @click="toSubmit()">提交</van-button>
      </div>



  </div>
</template>

<style scoped>

.form1__label{
  font-size: 20px;

}
.van-button{
  width: 300px;
  height: 45px;
  margin-top: 50px;
  background-color: #7db0ff;
  color: #fff;
  font-size: 25px;
  font-weight: bold;
}
.btn2{
  margin-top: 100px;
}
.btn3{
  margin-top: 52px;
}
.span1{
  margin-top: -30px;
  font-weight: bold;
}
.h1{
  margin-top: -62px;
  color: #fff;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  line-height: 53px;
}
.h2{
  margin-top: -62px;
  color: #ffffff;
  font-size: 30px;
  line-height: 53px;
  margin-left: -360px;
}
.btn1{
  margin-top: -53px;
}
.btn{
  width: 100%;
  height: 53px;
  background-color: #7db9ce;
  font-size: 25px;
  i{
    margin-top: 15px;
    margin-left: 5px;
  }
}


</style>

<script>
import axios from "axios";

export default {
  data() {
    return {
      onSubmit:{
        username: "",
        usercard: ""
      },
    };
  },
  methods: {
    fh() {
      this.$router.push('/securityCenter');
    },
    // 提交表单的方法
    toSubmit() {
      axios.post('/order/NUserauthform/yanzheng',this.onSubmit).then(res=>{
          this.$message.success("认证成功");
          this.$router.push('/securityCenter')

      })
    }
    }
}
</script>
